﻿using System;
using System.Diagnostics;
using MovieDB.ServiceInterfaces;

namespace MovieDB.Logging
{
    public class DevLogger : ILogger
    {
        private const string LogerName = "DevLogger --> ";

        #region ILogger Members

        public void LogException(string message, Exception exception)
        {
            var exceptionMessage = (exception != null) ? exception.Message : string.Empty;
            Debug.WriteLine(string.Format("{0}{1}: {2}{3}",LogerName, "Exception" , message, exceptionMessage));
        }

        public void LogError(string message)
        {
            Debug.WriteLine(string.Format("{0}{1}: {2}",LogerName,"Error" , message));
        }

        public void LogWarning(string message)
        {
            Debug.WriteLine(string.Format("{0}{1}: {2}", LogerName, "Warning", message));
        }

        public void LogDebug(string message)
        {
            Debug.WriteLine(string.Format("{0}{1}: {2}", LogerName, "Debug", message));
        }

        #endregion
    }
}